window.onload = function() {
  let disc = document.getElementById('disc')
  // console.log(disc);
  let audio = document.getElementsByTagName('audio')[0]
  // console.log(audio);
  let circlePage1 = document.querySelector('.lantern-bg')
  // console.log(circlePage1);
  let click2016 = document.querySelector('.click')
  let page1 = document.querySelector('.page_1')
  let page2 = document.querySelector('.page_2')
  let page3 = document.querySelector('.page_3')
  audio.volume = 0.1
  // 唱片点击
  disc.onclick = function() {
    if(audio.paused) {
      audio.play()
      this.setAttribute('class', 'record-disc disc')
      this.style.webkitAnimationPlayState = 'running';
      
    } else {
      audio.pause()
      this.style.webkitAnimationPlayState = 'paused';
     
    }
    // console.log(this);
  }
  // 点击第一页灯笼
  circlePage1.onclick = function() {
    // console.log('ok');
    page1.setAttribute('class', 'page_1 hide')
    setTimeout(() => {
      // page1.setAttribute('class', 'hidden')
      page1.style.display = 'none'
      page2.style.display = 'block'
      setTimeout(() => {
        // console.log('page2');
        page2.setAttribute('class', 'page_2 hide')
        page2.style.display = 'none'
        page3.style.display = 'block'
      }, 3000)
    }, 1000)
  }
  click2016.onclick = function() {
    // console.log('ok2016');
    page1.setAttribute('class', 'page_1 hide')
    setTimeout(() => {
      // page1.setAttribute('class', 'hidden')
      page1.style.display = 'none'
      page2.style.display = 'block'
      setTimeout(() => {
        // console.log('page2');
        page2.setAttribute('class', 'page_2 hide')
        page2.style.display = 'none'
        page3.style.display = 'block'
      }, 3000)
    }, 1000)
  }
  

  1
  2
  123

}
